// import com.alibaba.druid.sql.ast.SQLExpr_ptr;
// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLStatement_ptr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLCreateOutlineStatement.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLName.h"

SQLName_ptr SQLCreateOutlineStatement::getName()
{
  return name;
}

void SQLCreateOutlineStatement::setName(SQLName_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLCreateOutlineStatement));
  }
  this->name = x;
}

SQLStatement_ptr SQLCreateOutlineStatement::getOn()
{
  return on;
}

void SQLCreateOutlineStatement::setOn(SQLStatement_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLCreateOutlineStatement));
  }
  this->on = x;
}

SQLStatement_ptr SQLCreateOutlineStatement::getTo()
{
  return to;
}

void SQLCreateOutlineStatement::setTo(SQLStatement_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLCreateOutlineStatement));
  }
  this->to = x;
}

void SQLCreateOutlineStatement::accept0(SQLASTVisitor_ptr v)
{
  if (v->visit(SharedObject(SQLCreateOutlineStatement)))
  {
    acceptChild(v, name);
    acceptChild(v, where);
    acceptChild(v, on);
    acceptChild(v, to);
  }
  v->endVisit(SharedObject(SQLCreateOutlineStatement));
}

SQLExpr_ptr SQLCreateOutlineStatement::getWhere()
{
  return where;
}

void SQLCreateOutlineStatement::setWhere(SQLExpr_ptr x)
{
  if (x != nullptr)
  {
    x->setParent(SharedObject(SQLCreateOutlineStatement));
  }
  this->where = x;
}
